<!--
 * @Author: ryo
 * @Date: 2021-11-29 16:26:09
 * @LastEditors: ryo
 * @LastEditTime: 2021-11-29 16:42:19
 * @Company: 大成国测
 * @Description: 公司新闻详情组件
 * @FilePath: \site\src\views\company\News.vue
-->
<template>
  <v-container fluid class="box">
    <v-breadcrumbs :items="breadcrumbModel.list"></v-breadcrumbs>
    <v-row>
      <v-col cols="12" class="text-center">
        <div class="text-h5 mb-4">{{ news.title }}</div>
        <div class="d-flex align-center justify-center mb-4">
          <v-icon left>mdi-clock</v-icon>
          {{ news.date }}
        </div>
        <div class="mb-4">
          <v-img :src="news.img"></v-img>
        </div>
        <div class="text-left" v-html="news.content"></div>
      </v-col>
    </v-row>
  </v-container>
</template>

<script>
// 常量
import constant from '@/const';

export default {
  name: 'PorductDetail',
  data() {
    return {
      breadcrumbModel: {
        list: [
          {
            text: '首页',
            href: '/'
          },
          {
            text: '公司新闻',
            href: '/company#news'
          }
        ]
      }
    };
  },
  computed: {
    news() {
      return constant.company.news.find(
        item => item.id == this.$route.params.id
      );
    }
  },
  created() {
    this.breadcrumbModel.list.push({
      text: this.news.title
    });
  }
};
</script>

<style></style>
